package br.com.autoleal.cliente.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name = "pessoa_juridica")
@NamedQueries({
	@NamedQuery(name = "PessoaJuridica.buscarTodos", query = "SELECT pj FROM PessoaJuridica pj"),
	@NamedQuery(name = "PessoaJuridica.buscarCnpjRazaoNoFantasiaCodigo", query = "SELECT pj FROM PessoaJuridica pj WHERE pj.codigo LIKE :codigo OR pj.cnpj LIKE :cnpj OR upper(pj.razaoSocial) LIKE :razaoSocial OR upper(pj.noFantasia) LIKE :noFantasia")
})
public class PessoaJuridica extends Cliente implements Serializable {

	private static final long serialVersionUID = 635805233224525824L;

	@Column(name = "no_fantasia", nullable = false)
	private String noFantasia;

	@Column(name = "cnpj", nullable = false)
	private String cnpj;

	@Column(name = "razao_social", nullable = false)
	private String razaoSocial;

	public String getNoFantasia() {
		return noFantasia;
	}

	public void setNoFantasia(String noFantasia) {
		this.noFantasia = noFantasia;
	}

	public String getCnpj() {
		return cnpj;
	}

	public void setCnpj(String cnpj) {
		this.cnpj = cnpj;
	}

	public String getRazaoSocial() {
		return razaoSocial;
	}

	public void setRazaoSocial(String razaoSocial) {
		this.razaoSocial = razaoSocial;
	}

}
